#!/bin/bash

[ -f  /etc/yum.repos.d/local.repo ] &&  echo  "有" || echo "没有"
[ -d /etc/yum.repos.d ] && echo "有" || echo "没有"
[ -x /etc/yum.repos.d/local.repo ] && echo "有" || echo "没有"
[ -L /etc/yum.repos.d/local.repo ] && echo "有" || echo "没有"

#
#[ -f /etc/yum.repos.d/local.repo ] &&  sudo  rm -rf  /etc/yum.repos.d/local.repo 
[ -f  /etc/yum.repos.d/local.repo ] &&  echo  "有" ||  sudo touch  /etc/yum.repos.d/local.repo
[ -s  /etc/yum.repos.d/local.repo ] &&  echo "不为空" || echo  "[abc]" > /etc/yum.repos.d/local.repo 
